package com.ruoyi.framework.web.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.ruoyi.system.service.ISysConfigService;

/**
 * RuoYi首创 html调用 thymeleaf 实现参数管理
 *
 * @author ruoyi
 */
@Service("config")

public class ConfigService {
    @Autowired
    private ISysConfigService configService;

    /**
     * 根据键名查询参数配置信息
     *
     * @param configKey 参数名称
     * @return 参数键值
     */
    /**
     * @return
     * @throws
     * @msg: null
     * @Author: XiaoYi...
     * @Date : 2020-03-19 10:44
     */
    public String getKey(String configKey) {
        return configService.selectConfigByKey(configKey);
    }


    @Value("${baiduApi.key}")
    private String key;

    public String baiduKey() {
        return key;
    }
}
